<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: include/funcTraits.hpp 源文件</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">funcTraits.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d4/d67/func_traits_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/d8d/namespacewheels.html">wheels</a></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span>{</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span>    </div>
<div class="foldopen" id="foldopen00014" data-start="{" data-end="}">
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="../../d9/d6a/namespacewheels_1_1____private.html">   14</a></span>    <span class="keyword">namespace </span>__private{</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span>        <span class="keyword">template</span>&lt; <span class="keywordtype">size_t</span> IDX , <span class="keyword">typename</span> Args1 , <span class="keyword">typename</span> ...pArgs &gt;</div>
<div class="foldopen" id="foldopen00021" data-start="{" data-end="};">
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">   21</a></span>        <span class="keyword">struct </span><a class="code hl_struct" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">__arg_type</a>: <span class="keyword">public</span> <a class="code hl_struct" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">__arg_type</a>&lt; IDX - 1 , pArgs... &gt;{</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html#a180459c1e9ee6de657feb223e885b5a5">   22</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html#a180459c1e9ee6de657feb223e885b5a5">type</a> = <span class="keyword">typename</span> <a class="code hl_struct" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">__arg_type</a>&lt; IDX - 1 , pArgs... &gt;<a class="code hl_typedef" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html#a180459c1e9ee6de657feb223e885b5a5">::type</a>;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span>        };</div>
</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>        </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>        <span class="keyword">template</span>&lt; <span class="keyword">typename</span> Arg1 , <span class="keyword">typename</span> ...pArgs &gt;</div>
<div class="foldopen" id="foldopen00026" data-start="{" data-end="};">
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="../../de/d73/structwheels_1_1____private_1_1____arg__type_3_010_00_01_arg1_00_01p_args_8_8_8_01_4.html">   26</a></span>        <span class="keyword">struct </span><a class="code hl_struct" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">__arg_type</a>&lt;0, Arg1 , pArgs...&gt;{</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="../../de/d73/structwheels_1_1____private_1_1____arg__type_3_010_00_01_arg1_00_01p_args_8_8_8_01_4.html#a43335c50123d895659d92ca1765f213f">   27</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../de/d73/structwheels_1_1____private_1_1____arg__type_3_010_00_01_arg1_00_01p_args_8_8_8_01_4.html#a43335c50123d895659d92ca1765f213f">type</a> = Arg1;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>        };</div>
</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>        </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">   31</a></span>        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T &gt; <span class="keyword">struct </span><a class="code hl_struct" href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">__imp_func_traitor</a>{};</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>        <span class="keyword">template</span>&lt; <span class="keyword">typename</span> retType , <span class="keyword">typename</span> ...Args &gt;</div>
<div class="foldopen" id="foldopen00036" data-start="{" data-end="};">
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="../../d5/d08/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4.html">   36</a></span>        <span class="keyword">struct </span><a class="code hl_struct" href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">__imp_func_traitor</a>&lt;<a class="code hl_namespace" href="../../d8/dcc/namespacestd.html">std</a>::function&lt; retType ( Args... )&gt; &gt;{</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>            <span class="keyword">template</span>&lt; <span class="keywordtype">size_t</span> N &gt;</div>
<div class="foldopen" id="foldopen00042" data-start="{" data-end="};">
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../dc/d22/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type.html">   42</a></span>            <span class="keyword">struct </span><a class="code hl_struct" href="../../dc/d22/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type.html">argType</a>{</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>                <span class="keyword">static_assert</span>( N &lt; <span class="keyword">sizeof</span>...(Args)  , <span class="stringliteral">&quot;&quot;</span> );                 </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="../../dc/d22/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type.html#a9404a117140a657f75aa6e8f5ff07e4f">   44</a></span>                <span class="keyword">using </span><a class="code hl_typedef" href="../../dc/d22/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type.html#a9404a117140a657f75aa6e8f5ff07e4f">type</a> = <span class="keyword">typename</span> <a class="code hl_struct" href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">__arg_type</a>&lt; N , Args... &gt;::type;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>            };</div>
</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>            </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="../../d5/d08/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4.html#a2b60ec6856d09daa76ee564a4b21a571">   48</a></span>            <span class="keyword">using </span><a class="code hl_typedef" href="../../d5/d08/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4.html#a2b60ec6856d09daa76ee564a4b21a571">ret_type</a> = retType;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>        };</div>
</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    }</div>
</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../d2/dc1/structwheels_1_1func_traitor.html">   55</a></span>    <span class="keyword">template</span>&lt; <span class="keyword">typename</span> typeFunctor &gt; <span class="keyword">struct </span><a class="code hl_struct" href="../../d2/dc1/structwheels_1_1func_traitor.html">funcTraitor</a>{};</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>    <span class="keyword">template</span>&lt; <span class="keyword">typename</span> retType , <span class="keyword">typename</span> ...Args &gt;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="../../d1/d3d/structwheels_1_1func_traitor_3_01ret_type_07_args_8_8_8_08_01_4.html">   59</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="../../d2/dc1/structwheels_1_1func_traitor.html">funcTraitor</a>&lt; retType(Args...) &gt;: <span class="keyword">public</span> <a class="code hl_struct" href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">__private::__imp_func_traitor</a>&lt; std::function&lt; retType (Args...) &gt; &gt; {};</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <span class="keyword">template</span>&lt; <span class="keyword">typename</span> <span class="keyword">class</span>Type , <span class="keyword">typename</span> funcType &gt;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="../../de/ddc/structwheels_1_1func_traitor_3_01func_type_01class_type_1_1_5_01_4.html">   63</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="../../d2/dc1/structwheels_1_1func_traitor.html">funcTraitor</a>&lt; funcType classType::*&gt; : <span class="keyword">public</span> <a class="code hl_struct" href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">__private::__imp_func_traitor</a>&lt; std::function&lt;funcType&gt; &gt; {};</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>    <span class="comment">// 函数对象</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="keyword">template</span>&lt; <span class="keyword">typename</span> retType , <span class="keyword">typename</span> ...Args &gt;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="../../d9/daa/structwheels_1_1func_traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_01_4_01_4.html">   66</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="../../d2/dc1/structwheels_1_1func_traitor.html">funcTraitor</a>&lt; <a class="code hl_namespace" href="../../d8/dcc/namespacestd.html">std</a>::function&lt; retType(Args...) &gt; &gt; : <span class="keyword">public</span> <a class="code hl_struct" href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">__private::__imp_func_traitor</a>&lt; std::function&lt; retType(Args...) &gt;&gt;{};</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>}</div>
<div class="ttc" id="anamespacestd_html"><div class="ttname"><a href="../../d8/dcc/namespacestd.html">std</a></div><div class="ttdef"><b>定义</b> <a href="../../d1/d92/mandarava_2event_8hpp_source.html#l00038">event.hpp:39</a></div></div>
<div class="ttc" id="anamespacewheels_html"><div class="ttname"><a href="../../df/d8d/namespacewheels.html">wheels</a></div><div class="ttdoc">堆栈信息读取和保存记录</div><div class="ttdef"><b>定义</b> <a href="../../d3/df7/ary__str_8hpp_source.html#l00006">ary_str.hpp:7</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____arg__type_3_010_00_01_arg1_00_01p_args_8_8_8_01_4_html_a43335c50123d895659d92ca1765f213f"><div class="ttname"><a href="../../de/d73/structwheels_1_1____private_1_1____arg__type_3_010_00_01_arg1_00_01p_args_8_8_8_01_4.html#a43335c50123d895659d92ca1765f213f">wheels::__private::__arg_type&lt; 0, Arg1, pArgs... &gt;::type</a></div><div class="ttdeci">Arg1 type</div><div class="ttdef"><b>定义</b> <a href="#l00027">funcTraits.hpp:27</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____arg__type_html"><div class="ttname"><a href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html">wheels::__private::__arg_type</a></div><div class="ttdoc">函数参数类型萃取器，采用递归的方式找到需要参数类型</div><div class="ttdef"><b>定义</b> <a href="#l00021">funcTraits.hpp:21</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____arg__type_html_a180459c1e9ee6de657feb223e885b5a5"><div class="ttname"><a href="../../d5/dc4/structwheels_1_1____private_1_1____arg__type.html#a180459c1e9ee6de657feb223e885b5a5">wheels::__private::__arg_type::type</a></div><div class="ttdeci">typename __arg_type&lt; IDX - 1, pArgs... &gt;::type type</div><div class="ttdef"><b>定义</b> <a href="#l00022">funcTraits.hpp:22</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type_html"><div class="ttname"><a href="../../dc/d22/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type.html">wheels::__private::__imp_func_traitor&lt; std::function&lt; retType(Args...)&gt; &gt;::argType</a></div><div class="ttdef"><b>定义</b> <a href="#l00042">funcTraits.hpp:42</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type_html_a9404a117140a657f75aa6e8f5ff07e4f"><div class="ttname"><a href="../../dc/d22/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_1_1arg_type.html#a9404a117140a657f75aa6e8f5ff07e4f">wheels::__private::__imp_func_traitor&lt; std::function&lt; retType(Args...)&gt; &gt;::argType::type</a></div><div class="ttdeci">typename __arg_type&lt; N, Args... &gt;::type type</div><div class="ttdef"><b>定义</b> <a href="#l00044">funcTraits.hpp:44</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4_html_a2b60ec6856d09daa76ee564a4b21a571"><div class="ttname"><a href="../../d5/d08/structwheels_1_1____private_1_1____imp__func__traitor_3_01std_1_1function_3_01ret_type_07_args_8_8_8_08_4_01_4.html#a2b60ec6856d09daa76ee564a4b21a571">wheels::__private::__imp_func_traitor&lt; std::function&lt; retType(Args...)&gt; &gt;::ret_type</a></div><div class="ttdeci">retType ret_type</div><div class="ttdoc">函数返回值类型</div><div class="ttdef"><b>定义</b> <a href="#l00048">funcTraits.hpp:48</a></div></div>
<div class="ttc" id="astructwheels_1_1____private_1_1____imp__func__traitor_html"><div class="ttname"><a href="../../d8/ded/structwheels_1_1____private_1_1____imp__func__traitor.html">wheels::__private::__imp_func_traitor</a></div><div class="ttdef"><b>定义</b> <a href="#l00031">funcTraits.hpp:31</a></div></div>
<div class="ttc" id="astructwheels_1_1func_traitor_html"><div class="ttname"><a href="../../d2/dc1/structwheels_1_1func_traitor.html">wheels::funcTraitor</a></div><div class="ttdef"><b>定义</b> <a href="#l00055">funcTraits.hpp:55</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
